/**
 * home中使用的定位获取的API的数据格式
 */
export interface Icity {
    id: string;
    name: string;
    abbr: string;
    area_code: string;
    sort: number;
    latitude: string;
    longitude: string;
    is_map: boolean;
    pinyin: string;
}
/**
 * 通过市和关键字判断的实际具体位置
 */
export interface IPlace {
    name: string;
    address: string;
    latitude: string;
    longitude: string;
    geohash: string;
}

export interface IfoodTypes {
    id: number;
    is_in_serving: boolean;
    description: string;
    title: string;
    link: string;
    image_url: string;
    icon_url: string;
    title_color: string;
    __v: number;
}

export interface IShopList{
    name: string;
    address: string;
    id: number;
    latitude: string;
    longitude: string;
    location: number[],
    phone:  string;
    category:  string;
    supports: {
        description:  string;
        icon_color:  string;
        icon_name:  string;
        id: number;
        name:  string;
        _id:  string;
    }[],
    status: 1,
    recent_order_num:  number;
    rating_count:  number;
    rating:  number;
    promotion_info:  string;
    piecewise_agent_fee: {
        tips:  string;
    };
    opening_hours: string[],
    license: {
        catering_service_license_image:  string;
        business_license_image:  string;
    };
    is_new: true,
    is_premium: true,
    image_path:  string;
    identification: {
        registered_number:  string;
        registered_address:  string;
        operation_period:  string;
        licenses_scope:  string;
        licenses_number:  string;
        licenses_date:  string;
        legal_person:  string;
        identificate_date: null,
        identificate_agency:  string;
        company_name:  string;
    };
    float_minimum_order_amount:  number;
    float_delivery_fee: number;
    distance:  string;
    order_lead_time: string;
    description:  string;
    delivery_mode: {
        color:  string;
        id: number;
        is_solid: true,
        text:  string;
    };
    activities: [],
    __v: number;
}

export interface IshopListQuery {
    latitude: string;
    longitude : string;
    offset : number ;
    limit : number;
    restaurant_category_id : undefined | number;
    order_by :undefined | number;
    // delivery_mode : '',
    // support_ids : undefined,
    restaurant_category_ids : string[] | undefined,
}

/**
 * shop页面的foodlist列表
 */
export interface IfoodList{
    name:string,
    description:string,
    restaurant_id:number,
    id:number,
    foods: {
        id:string,
        tips:string,
        item_id:number,
        category_id:number,
        restaurant_id:number,
        activity:{
            image:string,
            icon_color:string,
            image_text_color:string,
        },
        image_path:string,
        name:string,
        __v:number,
        specfoods:{
            specs_name: string,
            name: string,
            item_id: number,
            sku_id: number,
            food_id: number,
            restaurant_id: number,
            _id: string,
            specs: [],
            stock: number,
            checkout_mode: number,
            is_essential: boolean,
            recent_popularity: number,
            sold_out: boolean,
            price: number,
            promotion_stock: number,
            recent_rating: number,
            packing_fee: number,
            pinyin_name: string,
            original_price: number,
        }
        satisfy_rate: number,
        satisfy_count: number,
        attributes: {
            icon_name: string,
            icon_color:  string,
        }[],
        is_essential: boolean,
        server_utc:  string,
        specifications: [],
        rating_count: number,
        month_sales: number,
        description:  string,
        attrs: [],
        display_times: [],
        pinyin_name:  string,
        is_featured: number,
        rating: number,
    }[],
    type:number,
    icon_url:number,
    is_selected:boolean,
    __v:number,
}

export interface Ifoods {
    id:string,
    tips:string,
    item_id:number,
    category_id:number,
    restaurant_id:number,
    activity:{
        image:string,
        icon_color:string,
        image_text_color:string,
    },
    image_path:string,
    name:string,
    __v:number,
    specfoods:{
        specs_name: string,
        name: string,
        item_id: number,
        sku_id: number,
        food_id: number,
        restaurant_id: number,
        _id: string,
        specs: [],
        stock: number,
        checkout_mode: number,
        is_essential: boolean,
        recent_popularity: number,
        sold_out: boolean,
        price: number,
        promotion_stock: number,
        recent_rating: number,
        packing_fee: number,
        pinyin_name: string,
        original_price: number,
    }
    satisfy_rate: number,
    satisfy_count: number,
    attributes: {
        icon_name: string,
        icon_color:  string,
    }[],
    is_essential: boolean,
    server_utc:  string,
    specifications: [],
    rating_count: number,
    month_sales: number,
    description:  string,
    attrs: [],
    display_times: [],
    pinyin_name:  string,
    is_featured: number,
    rating: number,
}
export interface IrateList{
    "rated_at": string,
    "rating_star": number,
    "rating_text": string,
    "time_spent_desc": string,
    "_id": string,
    "username": string,
    "tags": [],
    "item_ratings": [
        {
            "food_id":number,
            "food_name": string,
            "_id": string,
            "is_valid": number,
            "image_hash": string,
        },
        {
            "food_id": number,
            "food_name": string,
            "_id": string,
            "is_valid": number,
            "image_hash": string,
        }
    ],
    "highlights": [],
    "avatar": string,
}

export interface IrateScore{
    compare_rating: number,
    deliver_time: number,
    food_score: number,
    order_rating_amount: number,
    overall_score: number,
    service_score: number,
}

export interface IrateTag {
    name: string,
    _id: string,
    unsatisfied: boolean,
    count: number,
}

export interface IuserInfo {
    username: string,
    user_id: number,
    id: number,
    point: number,
    mobile: string,
    is_mobile_valid: boolean,
    is_email_valid: boolean,
    is_active: number,
    gift_amount: number,
    email: string,
    delivery_card_expire_days: number,
    current_invoice_id: number,
    current_address_id: number,
    brand_member_new: number,
    balance: number,
    avatar: string,
    __v: number,
}
